/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package fwdisp;

import java.io.File;
import ch.ubique.inieditor.IniEditor;
import java.awt.Color;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
 *
 * @author rbs
 */
public class Settings {

    IniEditor settings;
    
    public Settings(File f)
    {
    settings = new IniEditor();
        try {
            settings.load(f);
        } catch (IOException ex) {
            Logger.getLogger(Settings.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
    
    public int getTxtLabelHeight(String typ)
    {
        return Integer.getInteger(settings.get("Txt-Height", typ));
    }
    
    public int getTxtSize(String typ)
    {
        return Integer.getInteger(settings.get("Text-Size", typ));
    }

    public Color getTxtFgColor(String typ)
    {
        return Color.getColor(settings.get("Text-Color", typ));
    }

    public Color getTxtBgColor(String typ)
    {
        return Color.getColor(settings.get("Label-Color", typ));
    }

    public Color getStatus2Color(String typ)
    {
        return Color.getColor(settings.get("Status2-Color", typ));
    }

    public Color getStatus3Color(String typ)
    {
        return Color.getColor(settings.get("Status3-Color", typ));
    }

    public Color getBrandBgColor(String typ)
    {
        return Color.getColor(settings.get("BrandBg-Color", typ));
    }

    public Color getTHBgColor(String typ)
    {
        return Color.getColor(settings.get("THBg-Color", typ));
    }
    
    public Boolean getDebugButton(String typ)
    {
        return Boolean.parseBoolean(settings.get("DebugButton", typ));
    }
    
    public Boolean getDualCarBar(String typ)
    {
        return Boolean.parseBoolean(settings.get("DebugButton", typ));
    }
    

    public Boolean getExitMsgActive()
    {
        return true; //TODO IMPLEMENT
    }
}
